<head>
    <title>项目详细信息</title>
    <link href="/lego/static/css/bootstrap.css" rel="stylesheet"/>
    <link href="/lego/static/css/header.css" rel="stylesheet"/>
    <script src="/lego/static/js/jquery.1.11.3.min.js"/></script>
    <script src = "/lego/static/js/bootstrap.js" ></script>
    <script src="/lego/static/js/underscore-min.js"></script>
    <script src="/lego/static/js/common.js"></script>
    <script type="text/javascript">
        $(function () {
            var projectId = $("#projectId").val();

            $.ajax({
                url: '/lego/getProjectDetail',
                type: 'GET',
                data: {'projectId': projectId},
                success: function (data) {
                    if (data && data.code == 200) {
                        $("#teamName").val(data.data.teamName);
                        $("#projectName").val(data.data.projectName);
                        $("#env").val(data.data.env);
                        $("#ip").val(data.data.ip);
                        $("#port").val(data.data.port);
                    }
                }
            });
        });
    </script>
</head>
<body>
    <#include "../navigationBar.ftl">
    <header class="jumbotron subhead" id="overview">
        <div class="container">
            <h1>项目信息管理</h1>
        </div>
    </header>

    <form class="form-horizontal">
        <div class="row">
            <label for="projectId" class="col-sm-4 control-label">项目编号</label>
            <div class="col-sm-4">
                <input type="text" class="form-control " readonly="readonly" id="projectId" value="${projectId}">
            </div>
        </div>
        <div class="row">
            <label for="teamName" class="col-sm-4 control-label">团队</label>
            <div class="col-sm-4" id="teamDiv">
                <input type="text" class="form-control " readonly="readonly"  id="teamName">
            </div>
        </div>
        <div class="row">
            <label for="projectName" class="col-sm-4 control-label">项目名称</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" readonly="readonly" id="projectName">
            </div>
        </div>
        <div class="row">
            <label for="env" class="col-sm-4 control-label">环境</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" readonly="readonly" id="env">
            </div>
        </div>
        <div class="row">
            <label for="ip" class="col-sm-4 control-label">IP</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" readonly="readonly" id="ip">
            </div>
        </div>
        <div class="row">
            <label for="port" class="col-sm-4 control-label">端口</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" readonly="readonly" id="port">
            </div>
        </div>

        <div class="text-center" style="margin-top: 15px">
            <a class="btn btn-primary" href="/lego/projectListIndex">
                <span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span>返回列表
            </a>
        </div>
    </form>
</body>
